package springbook.learningtest.jdk;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

import org.junit.Test;

public class HelloTarget implements Hello{

	@Override
	public String SayHello(String name) {
		return "Hello " + name;
	}

	@Override
	public String SayHi(String name) {
		return "Hi " + name;
	}

	@Override
	public String SayThankYou(String name) {
		return "Thank You " + name;
	}
	
	@Test
	public void simpleProxy(){
		Hello hello = new HelloTarget();
		assertThat(hello.SayHello("Toby"), is("Hello Toby"));
		assertThat(hello.SayHi("Toby"), is("Hi Toby"));
		assertThat(hello.SayThankYou("Toby"), is("Thank You Toby"));
	}
}
